﻿<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="utf-8" />
    <title>@ViewBag.Title - @("Application Name".Translate("ApplicationName"))</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />
    @Styles.Render("~/Content/css")
    @Styles.Render("~/Content/themes/base/css")

    @Scripts.Render("~/bundles/modernizr")
    @Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group.Add("telerik.common.css").Add("telerik.black.css"))
    @*@Html.RenderAnalyticScripts(GKFX.Common.Enumerations.CountrySiteScriptPositions.Header)*@

</head>
<body>
    @*@Html.RenderAnalyticScripts(GKFX.Common.Enumerations.CountrySiteScriptPositions.TopOfThePage)*@
    <header>
        <div class="content-wrapper">
            <div class="float-left">
                <p class="site-title">@Html.ActionLink("Logo".Translate("LogoName").ToString(), "Index", "Home")</p>
            </div>
            <div class="float-right">
                <section id="login">
                    @Html.Partial("~/Areas/Member/Views/shared/_LoginPartial.cshtml")
                    <div class="languageBox">
                        @Html.Partial("SiteSelector")
                    </div>
                </section>

            </div>

        </div>
        <nav>
            <div class="menuContainer">
                @Html.Action("TopMenu", "CMSMenu", new { area = "Admin" })
            </div>
        </nav>
    </header>
    <div id="body">
        @RenderSection("featured", required: false)
        <section class="content-wrapper main-content clear-fix">
            @RenderBody()
        </section>
    </div>
    <footer>
        <div class="content-wrapper">
            <div class="float-left">
                <p>&copy; @DateTime.Now.Year - @("Century".Label("CopyRight"))</p>
            </div>
        </div>
    </footer>
    <div id="ValidationEditorResult" style="display: none; z-index: 10000;"></div>
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/jqueryui")
    @RenderSection("scripts", required: false)
    <script type="text/javascript">
        //$(function () {
        //    $('.tradingScrollInner').jScrollPane({ showArrows: true });
        //});

        //********** Min length client validation Begin **********
        $(function () {
            jQuery.validator.addMethod('minlen', function (value, element, param) {

                if (!value) return true;
                if (value.length < param) {
                    return false;
                }
                else {
                    return true;
                }
                return false;
            });

            jQuery.validator.unobtrusive.adapters.add('minlen', ['min'], function (options) {
                options.rules['minlen'] = options.params['min'];
                options.messages['minlen'] = options.message;
            });

            //********** Min length client validation End **********

            //********** Max length client validation Begin **********
            jQuery.validator.addMethod('maxlen', function (value, element, param) {
                if (!value) return true;
                if (value.length > param) {
                    return false;
                }
                else {
                    return true;
                }
                return false;
            });

            jQuery.validator.unobtrusive.adapters.add('maxlen', ['max'], function (options) {
                options.rules['maxlen'] = options.params['max'];
                options.messages['maxlen'] = options.message;
            });
            //********** Max length client validation End **********

            //********** Check box required checked client validation Begin **********
            jQuery.validator.addMethod('checkrequired', function (value, element, param) {

                if (element.checked != true) {
                    return false;
                }
                else {
                    return true;
                }
                return false;
            });

            jQuery.validator.unobtrusive.adapters.add('checkrequired', [], function (options) {
                options.rules['checkrequired'] = true;
                options.messages['checkrequired'] = options.message;
            });
            //********** Check box required checked client validation End **********

            //********** Confirm client validation Begin **********
            jQuery.validator.addMethod('confir', function (value, element, param) {

                if (!value) return false;
                if ($('#' + param).val() == value) {
                    return true;
                }
                return false;
            });

            jQuery.validator.unobtrusive.adapters.add('confir', ['confir'], function (options) {
                options.rules['confir'] = options.params['confir'];
                options.messages['confir'] = options.message;
            });
            //********** Confirm client validation End **********

        }(jQuery));
    </script>
    <script type="text/javascript">
        $(window).load(function () {
            $('.jquery-selectbox[data-val-required]').after("<div class='inputBorder'></div>")
            $('input[data-val-required][type!="hidden"][type!="checkbox"]').after("<div class='inputBorder'></div>")
            $('textarea[data-val-required]').after("<div class='inputBorder'></div>")
        });
    </script>
    @Html.Telerik().ScriptRegistrar().jQuery(false)

    @* @Html.Partial("CommonPartials/PageBasedSettingsLoader", new ViewDataDictionary { { "type", GKFX.Common.Enumerations.SitePageParameterType.Js } })*@



    @* @Html.RenderAnalyticScripts(GKFX.Common.Enumerations.CountrySiteScriptPositions.Header)*@




    @if (Century.Web.Security.Authorizations.CenturyAuthorization.Authorize(new Century.Model.ActionModule { Name = "InlineEditing", DisplayName = "Inline Editing" }))
    {
        @Html.Action("InlineEditingHeaderScripts", "InlineEditing", new { area = "Admin" })
    }
    @if (Century.Web.Security.Authorizations.CenturyAuthorization.Authorize(new Century.Model.ActionModule { Name = "InlineEditing", DisplayName = "Inline Editing" }))
    {
        @Html.Action("InlineEditingBodyHtml", "InlineEditing", new { area = "Admin" })
    }
@*@Html.RenderAnalyticScripts(GKFX.Common.Enumerations.CountrySiteScriptPositions.BottomOfThePage)*@
    <script type="text/javascript" src="@Url.Content("~/Areas/Admin/Content/themes/admin/js/main.js")"></script>
    @Html.PageScripts()
</body>
</html>

